home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group96a.txt / 000132_icon-group-sender _Tue Jun 11 01:03:56 1996.msg < prev    next >
Internet Message Format  |  1996-09-05  |  2KB

  1. Received: by cheltenham.cs.arizona.edu; Wed, 12 Jun 1996 09:00:07 MST
  2. To: icon-group@cs.arizona.edu
  3. Date: Tue, 11 Jun 1996 01:03:56 GMT
  4. From: beatty@netcom.com (Derek Lee Beatty)
  5. Message-Id: <4pigls$1kq@beatty.slip.netcom.com>
  6. Organization: none
  7. Sender: icon-group-request@cs.arizona.edu
  8. References: <199606071540.LAA18004@morgoth>, <4pa3hq$lpc@labrador.cs.purdue.edu>, <4pd03h$g3o@lectura.CS.Arizona.EDU>
  9. Subject: Re: m3 should have SWAP(a,b)
  10. Errors-To: icon-group-errors@cs.arizona.edu
  11. Status: O
  12.  
  13. dave@CS.Arizona.EDU (Dave Schaumann) wrote:
  14. >For my part, the only time I've found 'swap' to be a useful
  15. >operation is when I am writing sort algorithm (or sort-related algorithms,
  16. >like heap manipulation).  Since (in my experience, anyway) this is not a
  17. >frequent occurrance, it doesn't seem like the best idea in the world to
  18. >include 'swap' as part of any language's basic repetoir of operations.
  19. >
  20. >Perhaps others have found a more extensive use for swapping?
  21. >
  22.  
  23. I've found SWAP useful in VLSI circuit analysis.  I suspect other domains 
  24. where the natural representation is nearly a graph might be similar.
  25.  
  26. I'd expect that once you decide to include SWAP, generalizing to multiple 
  27. assignment might be worthwhile.  Perhaps after the right-hand sides are 
  28. evaluated, all the left-hand sides could be updated atomically?  (I'm just 
  29. guessing here; perhaps that would complicate the runtime unnecessarily.)
  30.  
  31. -- 
  32. Derek Lee Beatty          _                       Death
  33. beatty@netcom.com       _| ~-,                    Taxes
  34. Austin, Texas           \, * }                     C++
  35.                           \_(
  36.